<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
        <link rel="stylesheet" href="./layui/css/layui.css" />
    </head>
    <body>
        <script src="./layui/layui.js"></script>
        <!-- <form action="/users/reg" method="post">
        <div>
            <label for="username">用户名</label>
            <input type="text" name="username" id="username">
        </div>
        <div>
            <label for="pwd">密码</label>
            <input type="text" name="pwd" id="pwd">
        </div>
        <input type="submit">
    </form> -->
        <button id="ajaxBtn" type="button" class="layui-btn">按钮</button>
        <!-- <script>
        function callback(data){
            console.log(data);
        }
    </script>
    <script type="text/javascript" src="http://localhost:3001/students"></script> -->

        <script>
            // layui.define(function(){
            //     let {$} = layui;
            //     $("#ajaxBtn").click(function(){
            //         $.ajax({
            //             type:"get",
            //             url:"http://localhost:3001/students",
            //             dataType:"jsonp",
            //             // jsonpCallback:"callback",
            //             success(res){
            //                 console.log(res);
            //             }
            //         })
            //     })
            // });
            let num = 5;
            while (num--) {
                console.log(num);
                setTimeout(() => {
                    console.log(num);
                }, 0);
            }
        </script>
    </body>
</html>
